//
//  MarketGoodsCell.h
//  yigou
//
//  Created by wangdianlei on 2017/1/5.
//  Copyright © 2017年 hanyiwang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MMMarketNew.h"

typedef NS_ENUM(NSInteger, MarketGoodCellType) {
    IMarketGoodCellNew = 0,
    IMarketGoodCellWorth,
};

@protocol MarketGoodCellDelegate;

@interface MarketGoodsCell : UITableViewCell

@property (assign, nonatomic) MarketGoodCellType type;
@property (assign, nonatomic) NSInteger index;
@property (assign, nonatomic) id<MarketGoodCellDelegate> delegate;

@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UIView *left;
@property (weak, nonatomic) IBOutlet UIView *right;
@property (weak, nonatomic) IBOutlet UIView *line;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *titleH;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lineH;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lrinter;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *rtrail;

@property (nonatomic, strong) UIImageView *limg;
@property (nonatomic, strong) UILabel *lgoodname;
@property (nonatomic, strong) UILabel *lprice;
@property (nonatomic, strong) UILabel *ltag1;
//@property (nonatomic, strong) UILabel *ltag2;
@property (nonatomic, strong) UILabel *laddr;
@property (nonatomic, strong) UIImageView *rimg;
@property (nonatomic, strong) UILabel *rgoodname;
@property (nonatomic, strong) UILabel *rprice;
@property (nonatomic, strong) UILabel *rtag1;
//@property (nonatomic, strong) UILabel *rtag2;
@property (nonatomic, strong) UILabel *raddr;

- (void)fillWithData:(MMMarketNew *)ldata right:(MMMarketNew *)rdata;

@end

@protocol MarketGoodCellDelegate <NSObject>

- (void)clickMarketGoodCell:(NSInteger)index isLeft:(BOOL)clickLeft myType:(MarketGoodCellType)type;

@end
